package com.example.qdindex.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.example.bean.GouWuCheInfo;
import org.example.bean.TushuInfo;

import java.util.List;

@Mapper
public interface GouWuCheMapper {
    @Select("select * from gouwuche where keHuId=#{kehuid} and shuliang>0")
    List<GouWuCheInfo> findGWCByKeHuId(int kehuid);
    @Select("select * from tushu where tushuid  =#{tushuid} and zhuangtai=1")
    TushuInfo findTuShuByTuShuId(int tushuid);
    @Update("update gouwuche set shuliang=#{shuliang} where tuShuId=#{tuShuId}")
    void updateGWCShuliang(@Param("shuliang") int shuliang,@Param("tuShuId") int tuShuId);
}
